package com.element.security.single.constant;

public class SecurityParams {

    /**
     * 请求路径
     */
    public final static String OAUTH_TOKEN = "/oauth/token";

    /**
     * 解析请求参数 user_name
     */
    public final static String USER_NAME = "user_name";

    /**
     * 解析请求参数 password
     */
    public final static String PASSWORD = "password";

    /**
     * 解析请求参数 grant_type
     */
    public final static String GRANT_TYPE = "grant_type";

    public static String getTokenKey(String accessToken) {
        return "spring:security:single:token:" + accessToken;
    }

    public static String getUserKey(String userId) {
        return "spring:security:single:user:" + userId;
    }
}